using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ANGF
{
	public partial class FormNameEntry : Form
	{
		public FormNameEntry()
		{
			InitializeComponent();
		}

		private string defaultValue = "";
		public void SetValues(string caption, string defaultValue)
		{
			this.labelCaption.Text = caption;
			this.textBoxName.SelectedText = defaultValue;
			this.defaultValue = defaultValue;
		}

		public string GetResult()
		{
			return this.textBoxName.Text;
		}

		private void buttonDefault_Click(object sender, EventArgs e)
		{
			this.textBoxName.Text = "";
			this.textBoxName.SelectedText = defaultValue;
		}

		private void buttonOK_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.OK;
			Close();
		}
	}
}